import 'package:flutter/material.dart';
import 'package:ivc/model/bizmodel.dart';
import 'package:transparent_image/transparent_image.dart';
import '../../routers/application.dart';
import '../../model/test_data.dart';
import "../factory/running_status.dart";
class CheckSplitPage extends StatefulWidget {
  final String id;
  final bool readonly;

  CheckSplitPage({this.id, this.readonly});
  @override
  CheckSplitPageState createState() => new CheckSplitPageState();
}

class CheckSplitPageState extends State<CheckSplitPage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("订单确认"),
      ),
      body: ListView(
          children: <Widget>[
            RunningStatus(),
            Card(
              color: Colors.blue,
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: <Widget>[
                  ListTile(
                    leading: Icon(Icons.markunread_mailbox),
                    title: Text("明日之星玩具坊发来订单"),
                    subtitle: Text('MRZX2019-M-03型玩具 1000套'),
                    trailing: Text("交付时间\n2019-11-10"),
                  ),
                  ButtonTheme.bar(
                    child: ButtonBar(
                      children: <Widget>[
                        FlatButton(
                          child: const Text(
                              '确认生产', style: TextStyle(color: Colors.white)),
                          onPressed: () {
                            Application.router.navigateTo(
                                context, "/confirm_split");
                          },
                        ),
                        FlatButton(
                          child: const Text(
                              '放弃生产', style: TextStyle(color: Colors.white)),
                          onPressed: () {
                            Application.router.navigateTo(
                                context, "/giveup_split");
                          },
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
            Text(
                '''尊敬的生产厂家好, 本公司需要在2019-11-10前交付产品, 请务必达成,谢谢!
产品名称: 明日之星玩具
产品型号: MRZX2019-M-03
生产数量: 1000套
生产交期: 2019-11-10
付款节奏: 20-80
付款方式: 平台(区块链)
信用评分: 1200
''',
                style: TextStyle(fontSize: 16, color: Colors.black54)),

            SizedBox(
              height: 500,
              child: Container(),
            )
          ]),
    );
  }
}
